#ifndef __KEY_BOARD_SAMPLE_H
#define __KEY_BOARD_SAMPLE_H

#ifdef __cplusplus
 extern "C" {
#endif /* __cplusplus */
	 
	 
#include "stm32f4xx.h"
#include "Gkey_board.h"


/*下拉输入，高有效*/
#define KEY1_PORT               GPIOE
#define KEY1_PIN                GPIO_Pin_4
#define KEY1_PRESS_LEVEL         0u
#define KEY1_RELEASE_LEVEL       1u

#define KEY2_PORT               GPIOE
#define KEY2_PIN                GPIO_Pin_5
#define KEY2_PRESS_LEVEL         0u
#define KEY2_RELEASE_LEVEL       1u
	 
#define KEY3_PORT               GPIOE
#define KEY3_PIN                GPIO_Pin_6
#define KEY3_PRESS_LEVEL         0u
#define KEY3_RELEASE_LEVEL       1u

#define KEY4_PORT               GPIOC
#define KEY4_PIN                GPIO_Pin_13
#define KEY4_PRESS_LEVEL         0u
#define KEY4_RELEASE_LEVEL       1u


#define RCC_KEY_BOARD_CLK_ENABLE() do { \
   RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE|RCC_AHB1Periph_GPIOC,ENABLE); \
}while(0)

enum key_id_e {
    KEY1,
    KEY2,
		KEY3,
		KEY4,
};

/*按键 GPIO 初始化*/
extern void GPIO_Key_Board_Init(void);

#ifdef __cplusplus
}
#endif /* __cplusplus */


#endif/*__KEY_BOARD_SAMPLE_H*/
